﻿using System.Collections.Generic;
using Red.Controls.ViewModels;

namespace Red.Controls.Diagrams
{
    public interface IObject
    {
        string ReadProperty( string propertyName );
        void WriteProperty( string propertyName, string value, string valueID = "", string operationID = "" );

        void WritePropertyDirect( string propertyName, string value, string valueID = "", string operationID = "" );

        IProperty GetProperty( string propertyName );

        string ID { get; }
        string Class { get; }
        bool IsRoot { get; }

        /// <summary>
        /// Returns list of property names that were saved via ReadProperty/WriteProperty methods.
        /// </summary>
        /// <returns></returns>
        IEnumerable<string> GetProperties();

        /// <summary>
        /// This is used to obtain DataItem which we can use to feed Stacker control to show this object properties.
        /// </summary>
        /// <returns></returns>
        DataItem GetDataItem();
    }
}
